<?php
/**
 * Moduł resetu ustawień 
 * @author Miron Pawlik
 */

if($user->isLocked())
{
	header("Location: ".$_conf['host']);
	exit;
}


if($fd['no'])
{
	header("Location: ".$_conf['host']);
}
if($fd['yes'])
{
	
	$db->delById($user->getId(), 'studentTerms', 'indexID');
	$db->delById($user->getId(), 'chosenTerms', 'indexID');
	$db->delById($user->getId(), 'studentSubjects', 'indexID');
	$db->delById($user->getId(), 'groups', 'ownerID');
	$db->delById($user->getId(), 'groups', 'memberID');
	$db->editById($user->getId(), 'students', array('register'=>0, 'subjectsChoose'=>0), 'indexID');
	header("Location: ".$_conf['host']);
}
